/**
 * Free software.
 */

package org.nanhill.smgp;

/**
 * Based on SMGP 2.0.
 * 
 * For multithread use.
 * 
 * @author alin [xalinx at gmail dot com]
 * @date 2006-10-25
 */
public interface SMGWClient {

	/**
	 * Init smgw client with property file.
	 * 
	 * @param initFile
	 * @return
	 */
	boolean init(String initFile);

	/**
	 * Send single sm.
	 * 
	 * @param needReport
	 * @param msgLevel
	 * @param serviceId
	 * @param msgFormat
	 * @param feeType
	 * @param feeCode
	 * @param fixedFee
	 * @param validTime
	 * @param atTime
	 * @param srcTermId
	 * @param chargeTermID
	 * @param destTermID
	 * @param msgLen
	 * @param msgContent
	 * @param resp
	 * @param msgType
	 * @param reserved
	 * @return
	 */
	boolean sendSingle(int needReport, int msgLevel, String serviceId,
			int msgFormat, String feeType, String feeCode, String fixedFee,
			String validTime, String atTime, String srcTermId,
			String chargeTermID, String destTermID, int msgLen,
			String msgContent, SMGPSendResp resp, String msgType,
			String reserved);

	/**
	 * Send batch sm.
	 * 
	 * @param needReport
	 * @param msgLevel
	 * @param serviceId
	 * @param msgFormat
	 * @param feeType
	 * @param feeCode
	 * @param fixedFee
	 * @param validTime
	 * @param atTime
	 * @param srcTermIds
	 * @param chargeTermID
	 * @param destTermID
	 * @param msgLen
	 * @param msgContent
	 * @param resp
	 * @param msgType
	 * @param reserved
	 * @return
	 */
	boolean sendBatch(int needReport, int msgLevel, String serviceId,
			int msgFormat, String feeType, String feeCode, String fixedFee,
			String validTime, String atTime, String[] srcTermIds,
			String chargeTermID, String destTermID, int msgLen,
			String msgContent, SMGPSendBatchResp resp, String msgType,
			String reserved);

	/**
	 * Receive sm.
	 * 
	 * @param nTimeOut
	 * @param resp
	 * @return
	 */
	boolean receive(int timeOut, SMGPReceiveResp resp);

	/**
	 * Test the smgw server is active.
	 * 
	 * @param resp
	 * @return
	 */
	boolean activeTest(SMGPActiveResp resp);
}
